home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / AIncludes / ATalkEqu.a < prev    next >
Encoding:
Text File  |  1992-01-29  |  23.9 KB  |  637 lines  |  [TEXT/MPS ]

  1. ; Version: 2.9
  2. ; Created: Friday, October 20, 1989 at 9:11:59 PM
  3. ;
  4. ; File: ATalkEqu.a
  5. ;
  6. ; Assembler Interface to the Macintosh Libraries
  7. ; Copyright Apple Computer, Inc. 1984-1991
  8. ; All Rights Reserved
  9. ;
  10. ; AppleTalk Equates - This file defines the low-level equates for the
  11. ; AppleTalk drivers.
  12. ;--------------------------------------------------------------------
  13. ;
  14.     IF &TYPE('__IncludingATalkEqu__') = 'UNDEFINED' THEN
  15. __IncludingATalkEqu__    SET    1
  16.  
  17. ;
  18. ; AppleTalk unit numbers.
  19. ;
  20. mppUnitNum        EQU         9                         ; MPP unit number
  21. atpUnitNum        EQU         10                        ; ATP unit number
  22. xppUnitNum        EQU         40                        ; XPP unit number
  23. ;
  24. atpLoadedBit      EQU         4                         ; ATP loaded bit number in PortBUse
  25. xppLoadedBit      EQU         atpLoadedBit+1            ; XPP loaded bit number in PortBUse
  26. ;
  27. ;+ Name Binding Protocol (NBP)
  28. ;
  29. nbp               EQU         $02                       ; DDP protocol type code for NBP
  30. ;
  31. nbpControl        EQU         0                         ; Control code
  32. nbpTCount         EQU         0                         ; Tuple count
  33. nbpID             EQU         1                         ; NBP ID
  34. nbpTuple          EQU         2                         ; Start of the first tuple
  35. ;
  36. ;NBP tuple header offsets:
  37. ;
  38. tupleNet          EQU         0                         ; Offset to network no. [word]
  39. tupleNode         EQU         2                         ; Offset to node ID [byte]
  40. tupleSkt          EQU         3                         ; Offset to socket number [byte]
  41. tupleEnum         EQU         4                         ; Offset to enumerator [byte]
  42. tupleName         EQU         5                         ; Offset to name part of tuple [byte]
  43. tupleAddrSz       EQU         5                         ; tuple address field size
  44. ;
  45. ; NBP control codes - the following define the different types of NBP packets:
  46. ;
  47. brRq              EQU         1                         ; Broadcast request
  48. lkUp              EQU         2                         ; Lookup request
  49. lkUpReply         EQU         3                         ; Lookup reply
  50. ;
  51. ; NBP miscellaneous
  52. ;
  53. nis               EQU         2                         ; Names Information Socket (NIS) number
  54. tupleMax          EQU         15                        ; Most tuples in a lookup reply
  55. equals            EQU         '='                       ; Wildcard symbol
  56. star              EQU         '*'                       ; "This zone" symbol
  57. ;
  58. ;
  59. ;+ Routing Table Maintenance Protocol (RTMP)
  60. ;
  61. rtmp              EQU         $01                       ; DDP protocol type code for RTMP
  62. ;
  63. ; RTMP header offsets
  64. ;
  65. rtmpNet           EQU         0                         ; Offset to network number [word]
  66. rtmpIDLen         EQU         2                         ; Offset to ID length [byte]
  67. rtmpID            EQU         3                         ; Offset to start of ID field
  68. ;
  69. ; RTMP packets are received at the well-known RTMP listening socket:
  70. ;
  71. rtmpSkt           EQU         1                         ; Number of the RTMP socket
  72. ;
  73. ;
  74. ;;+ Datagram Delivery Protocol (DDP)
  75.  
  76. ddpHopCnt         EQU         0                         ; Hop count (only used in long header) [byte]
  77. ddpLength         EQU         0                         ; Packet length (from this word onwards) [word]
  78. ddpChecksum       EQU         2                         ; Checksum [word]
  79. ddpDstNet         EQU         4                         ; Destination network no. [word]
  80. ddpSrcNet         EQU         6                         ; Network of origin [word]
  81. ddpDstNode        EQU         8                         ; Destination node address [byte]
  82. ddpSrcNode        EQU         9                         ; Node of origin [byte]
  83. ddpDstSkt         EQU         10                        ; Destination socket number [byte]
  84. ddpSrcSkt         EQU         11                        ; Source socket number [byte]
  85. ddpType           EQU         12                        ; DDP type field [byte]
  86. ;
  87. sddpDstSkt        EQU         2                         ; Destination socket number (short header) [byte]
  88. sddpSrcSkt        EQU         3                         ; Source socket number (short header) [byte]
  89. sddpType          EQU         4                         ; DDP type field (short header) [byte]
  90. ;
  91. ddphSzLong        EQU         13                        ; Size of extended DDP header
  92. ddphSzShort       EQU         5                         ; Size of short DDP header
  93. ;
  94. shortDDP          EQU         $01                       ; LAP type code for DDP (short header)
  95. longDDP           EQU         $02                       ; LAP type code for DDP (long header)
  96. ;
  97. ; DDP miscellaneous
  98. ;
  99. ddpMaxWKS         EQU         $7F                       ; The highest valid well-known socket
  100. ddpMaxData        EQU         586                       ; Maximum DDP data size
  101. ddpLenMask        EQU         $03FF                     ; Mask for DDP length
  102. ;
  103. ;
  104. ;+ AppleBus Link Access Protocol (ABLAP)
  105. ;
  106. lapDstAdr         EQU         0                         ; Destination node address [byte]
  107. lapSrcAdr         EQU         1                         ; Source node address [byte]
  108. lapType           EQU         2                         ; LAP type field [byte]
  109. lapHdSz           EQU         3                         ; Size of LAP header
  110. ;
  111. ; zs returned by ReadPacket and ReadRest routines
  112. ;
  113. overrunErr        EQU         -1
  114. crcErr            EQU         -2
  115. underrunErr       EQU         -3
  116. lengthErr         EQU         -4
  117. ;
  118. ; SCC interrupt priority
  119. ;
  120. sccLockout        EQU         $2600                     ; This value works on both Mac and Lisa
  121. ;
  122. ;
  123. ;+ MPP (control calls to NBP, DDP and ABLAP)
  124. ;
  125. lookupReply       EQU         242                       ; This command queued to ourself
  126. writeLAP          EQU         243                       ; Write out LAP packet
  127. detachPH          EQU         244                       ; Detach LAP protocol handler
  128. attachPH          EQU         245                       ; Attach LAP protocol handler
  129. writeDDP          EQU         246                       ; Write out DDP packet
  130. closeSkt          EQU         247                       ; Close DDP socket
  131. openSkt           EQU         248                       ; Open DDP socket
  132. loadNBP           EQU         249                       ; Load NBP command-executing code
  133. lastResident      EQU         249                       ; Last resident command
  134. confirmName       EQU         250                       ; Confirm name
  135. lookupName        EQU         251                       ; Look up name on internet
  136. removeName        EQU         252                       ; Remove name from Names Table
  137. registerName      EQU         253                       ; Register name in Names Table
  138. killNBP           EQU         254                       ; Kill outstanding NBP request
  139. unloadNBP         EQU         255                       ; Unload NBP command code
  140. setSelfSend       EQU         256                       ; MPP: Set to allow writes to self
  141. SetMyZone       EQU         257                     ; Set my zone name
  142. GetATalkInfo     EQU            258                     ; get AppleTalk information
  143. ATalkClosePrep    EQU          259                     ; AppleTalk close query
  144. ;
  145. ;
  146. ; MPP queue element standard structure: arguments passed in the CSParam area
  147. ;
  148. socket            EQU         $1C                       ; Offset to socket number (DDP) [byte]
  149. checkSumFlag      EQU         $1D                       ; Offset to checksum flag (DDP) [byte]
  150. listener          EQU         $1E                       ; Offset to socket listener (DDP) [word]
  151. argBlkSz          EQU         $10                       ; Size of argument block to WriteDDP
  152. wdsPointer        EQU         $1E                       ; Offset to WDS pointer (DDP & ABLAP) [word]
  153. ;
  154. protType          EQU         $1C                       ; Offset to protocol type code (ABLAP) [byte]
  155. handler           EQU         $1E                       ; Offset to protocol handler (ABLAP) [word]
  156. ;
  157. interval          EQU         $1C                       ; Retry interval (NBP) [byte]
  158. count             EQU         $1D                       ; Retry count (NBP) [byte]
  159. entityPtr         EQU         $1E                       ; Entity pointer (NBP)
  160. ntQElPtr          EQU         $1E                       ; NT queue element ptr (NBP - Register)
  161. confirmAddr       EQU         $22                       ; Address to confirm at (NBP - Confirm)
  162. newSocket         EQU         $26                       ; Socket no. if different (NBP - Confirm) [byte]
  163. ;
  164. verifyFlag        EQU         $22                       ; Verify name flag (NBP - Register) [byte]
  165. ;
  166. retBuffPtr        EQU         $22                       ; Return buffer pointer (NBP - Lookup)
  167. retBuffSize       EQU         $26                       ; Return buffer size (NBP - Lookup) [word]
  168. maxToGet          EQU         $28                       ; Max no. responses to get (NBP - Lookup) [word]
  169. numGotten         EQU         $2A                       ; Number actually gotten (NBP - Lookup) [word]
  170. ;
  171. newSelfFlag       EQU         $1C                       ; Offset: New value for self-send flag
  172. oldSelfFlag       EQU         $1D                       ; Old value of self-send flag
  173. nKillQEl          EQU         $1C                       ; Pointer to queue element to abort (KillNBP)
  174. clientName      EQU         $1C                        ; (csCode+2) AtalkClosePrep call parm
  175. ;
  176. ; Names Table Queue element - the MPP registered names (and associated sockets)
  177. ;
  178. ntLink            EQU         0                         ; Link to next element
  179. ntTuple           EQU         4                         ; Start of tuple for replies
  180. ntSocket          EQU         7                         ; Socket number of entity [byte]
  181. ntEntity          EQU         9                         ; Start of entity name within tuple
  182. ;
  183. ; Well-known offsets within MPP local variables (as pointed to by AbusVars)
  184. ;
  185. sysLAPAddr        EQU         0                         ; This node's LAP address
  186. toRHA             EQU         1                         ; Top of RHA
  187. sysABridge        EQU         $19                       ; Node address of a bridge [byte]
  188. sysNetNum         EQU         $1A                       ; This node's network number [word]
  189. vSCCEnable        EQU         $1C                       ; SR value to re-enable SCC interrupts [word]
  190. atpVars           EQU         $1E                       ; ATP variable pointer (high byte is flag)
  191. ;
  192. ; MPP miscellaneous
  193. ;
  194. p2Version        EQU            53                        ; First version with Phase 2 calls
  195. rhaSize           EQU         $18                       ; Size of read header area
  196. wdsEntrySz        EQU         6                         ; Size of a WDS entry
  197. NBPWildCard     EQU         '≈'                     ; NBP wildcard delim char
  198. NBPMaxTupleSize EQU         32                      ; max size for a tuple name
  199. DDPHopsMask     EQU         $3C00                    ; Mask Hop Count bits from field in DDP header
  200. ;
  201. ; Bits in ioMix field on open (passed in)
  202. ;
  203. SrvAdrBit       EQU         31                      ; = 1 iff nodeID in server range ($80 - $FD) desired
  204. RouterBit       EQU         30                      ; = 1 iff this is a router port
  205. NoZoneNotify     EQU            29                      ; = 1 to supress Notification Mgr messages at .MPP open
  206. ;
  207. ; Bits in ioMix field on open (returned)
  208. ;
  209. BadZoneHintBit     EQU          7                       ; = 1 iff zone hint was found invalid at .MPP open
  210. OneZoneBit      EQU         6                       ; = 1 iff there was only one zone on cable
  211. BadNetHintBit     EQU           5                       ; = 1 iff our net not within RTMP cable range
  212. InStartupBit     EQU            4                       ; = 1 iff our net is in the startup range
  213. ;
  214. ;
  215. ;
  216. ; AppleTalk Transaction Protocol (ATP)
  217. ;
  218. atp               EQU         $3                        ; ATP type code (in DDP header)
  219. ;
  220. ; ATP header
  221. ;
  222. atpControl        EQU         0                         ; Control field [byte]
  223. atpBitmap         EQU         1                         ; Bitmap (requests only) [byte]
  224. atpRespNo         EQU         1                         ; Response number (responses only) [byte]
  225. atpTransID        EQU         2                         ; Transaction ID [word]
  226. atpUserData       EQU         4                         ; Start of user data [long]
  227. atpHdSz           EQU         8                         ; Size of ATP header
  228. ;
  229. ; ATP control field
  230. ;
  231. atpReqCode        EQU         $40                       ; Request code after masking
  232. atpRspCode        EQU         $80                       ; Response code after masking
  233. atpRelCode        EQU         $C0                       ; Release code after masking
  234. atpXOBit          EQU         5                         ; Bit number of exactly-once bit
  235. atpEOMBit         EQU         4                         ; Bit number of End-Of-Message bit
  236. atpSTSBit         EQU         3                         ; Send Transmission Status bit no.
  237. flagMask          EQU         $3F                       ; Mask for just flags
  238. controlMask       EQU         $F8                       ; Mask for good control bits
  239. ;
  240. ; ATP limits
  241. ;
  242. atpMaxNum         EQU         8                         ; Max no. of responses per request
  243. atpMaxData        EQU         $242                      ; Maximum data size in ATP packet
  244. ;
  245. ; ATP contol calls
  246. ;
  247. nSendRequest      EQU         248                       ; NSendRequest code
  248. relRspCB          EQU         249                       ; Release RspCB
  249. closeATPSkt       EQU         250                       ; Close ATP socket
  250. addResponse       EQU         251                       ; Add response code | Require open skt |
  251. sendResponse      EQU         252                       ; Send response code 
  252. getRequest        EQU         253                       ; Get request code
  253. openATPSkt        EQU         254                       ; Open ATP socket
  254. sendRequest       EQU         255                       ; Send request code
  255. relTCB            EQU         256                       ; Release TCB
  256. killGetReq        EQU         257                       ; Kill GetRequest
  257. killSendReq       EQU         258                       ; Kill SendRequest
  258. killAllGetReq     EQU           259                     ; Kill all getRequests for a skt
  259.  
  260. ;
  261. ;
  262. ;
  263. ; ATP queue element standard structure: arguments passed in the CSParam area
  264. ;
  265. atpSocket         EQU         $1C                       ; Socket number is first parameter [byte]
  266. atpFlags          EQU         $1D                       ; Flag [byte]
  267. addrBlock         EQU         $1E                       ; Start of address block
  268. reqLength         EQU         $22                       ; Size of request buffer [word]
  269. reqPointer        EQU         $24                       ; Pointer to request buffer or data
  270. bdsPointer        EQU         $28                       ; Pointer to Buffer Data Structure (BDS)
  271. guArea            EQU         $2C                       ; Start of general-use area
  272. userData          EQU         $12                       ; User bytes
  273. ;
  274. ; ATP bits
  275. ;
  276. sendCHK           EQU         0                         ; Bit no. of send-checksum bit in flags
  277. tidValid          EQU         1                         ; Bit set when TID valid in SendRequest
  278. ;
  279. ; SendRequest call interface
  280. ;
  281. numOfBuffs        EQU         $2C                       ; No. of response buffers passed in BDS [byte]
  282. timeoutVal        EQU         $2D                       ; Timeout length in seconds [byte]
  283. numOfResps        EQU         $2E                       ; Number of responses received [byte]
  284. retryCount        EQU         $2F                       ; Maximum number of retries [byte]
  285. ;
  286. reqTID            EQU         $16                       ; Request's TID returned here (for RelTCB)
  287. currBitmap        EQU         $1C                       ; Bitmap of responses not yet received [byte]
  288. ;
  289. ; GetRequest call interface
  290. ;
  291. bitmap            EQU         $2C                       ; Offset where bitmap is returned [byte]
  292. transID           EQU         $2E                       ; Transaction ID returned here [word]
  293. ;
  294. ; SendResponse call interface
  295. ;
  296. bdsSize           EQU         $2D
  297. ;
  298. ; AddResponse call interface
  299. ;
  300. rspNum            EQU         $2C                       ; No. of this response with transaction [byte]
  301. ;
  302. aKillQEl          EQU         $2C                       ; Offset: Pointer to queue element to abort
  303. ;
  304. ; ATP general
  305. ;
  306. maxReqs           EQU         6                         ; Maximum number of concurrent requests
  307. maxRsps           EQU         8                         ; Max number of concurrent XO responses
  308. maxATPSkts        EQU         6                         ; Max number of concurrent responding-sockets
  309. releaseTime       EQU         30                        ; Release timer value in seconds
  310. ;
  311. ; Info for TRel timer in SendRequest and NSendRequest
  312. ;
  313. atpTRTOmask        EQU            7                        ; mask to TRel timeout factor
  314. atpXcall        EQU            2                        ; bit to indicate extended atp call parms
  315. TRelTime        EQU            50                        ; TRel timeout bits offset
  316. ;
  317. ; ATP Buffer Descriptor Structure (BDS)
  318. ;
  319. bdsBuffSz         EQU         0                         ; Send: data length Receive: buffer length
  320. bdsBuffAdr        EQU         2                         ; Send: data address Receive: buffer address
  321. bdsDataSz         EQU         6                         ; Send: used internally Receive: data length
  322. bdsUserData       EQU         8                         ; Send: 4 user bytes Receive: 4 user bytes
  323. bdsEntrySz        EQU         12                        ; Size of a BDS entry
  324. ;
  325. ;
  326. ;+ Zone Information Protocol (ZIP)
  327. ;
  328. ZIP               EQU         6                        ; ZIP type code (in DDP header)
  329. ZIS             EQU         6                       ; Zone Information Socket number
  330. ;
  331. ;
  332. ; ZIP header
  333. ;
  334. zipCommand            EQU     0                           ; Offset to ZIP command in packet
  335. zipFlags            EQU     1                           ; Offset to flags (see below)
  336. zipFirstNet            EQU     2                            ; Network 1 in ZIP query, reply
  337. zipNetLo            EQU     zipFirstNet                    ; Offset to low network number in range
  338. zipNetHi            EQU        4                            ; Offset to high network number in range
  339. zipXHdSz               EQU     6                             ; Size of ZIP header (for extended ZIP)
  340. ;
  341. ; ZIP limits
  342. ;
  343. MaxZoneLen            EQU        33                            ; max size (in bytes) of zone name
  344. ZIPNetMax            EQU     3                           ; Our max networks in a ZIP packet
  345. ;
  346. ; ZIP Command field
  347. ;
  348. ZQuery              EQU     1                           ; Command code for query
  349. ZReply              EQU     2                           ; Command code for reply
  350. ZTakedown           EQU     3                           ; ZIP takedown
  351. ZBringUp            EQU     4                           ; ZIP bring up
  352. ZGetInfo            EQU        5                            ; GNI request
  353. ZInfoReply            EQU        6                            ; GNI reply
  354. ZNotify                EQU        7                            ; ZIP notify
  355. ZIPExtReply            EQU        8                            ; Command code for ZIPExtReply
  356. ;
  357. ; ZIP commands used in ATP calls
  358. ;
  359. ZATPCommand     EQU         0                       ; ZIP command offset in ATP user bytes (request)
  360. ZGZLStart       EQU         2                       ; User byte offset for StartIndex (GetZoneList)
  361. ZLastFlag       EQU         0                       ; User byte offset for LastFlag (GZL response)
  362. ZGZLCount       EQU         2                       ; User byte offset for Count (GZL response)
  363. ZGetMyZone        EQU         7                       ; Code for GetMyZone command
  364. ZGetZoneList    EQU         8                       ; Code for GetZoneList command
  365. ZGetLocalZones    EQU         9                       ; Code for GetLocalZones command
  366. ;
  367. ;
  368. ; ZIP Flags field
  369. ;
  370. ; (GetNetInfo Request)
  371. ;
  372. BcastReply            EQU        7                            ; Send reply to broadcast address
  373. ;
  374. ; (GetNetInfo Reply)
  375. ;
  376. ZoneInvalid            EQU        7                            ; zone is invalid
  377. UseBroadcast        EQU        6                            ; use broadcast for NBP lookups
  378. OneZone                EQU        5                            ; only one zone is present
  379. ;
  380. ; RTMP+ definitions
  381. ;
  382. ;
  383. rtmpPlus          EQU         5                         ; DDP type for RTMP+ packet
  384. getNetInfo        EQU         1                         ; RTMP+ command type for GetNetInfo
  385. ;
  386.                   EJECT
  387. ;
  388. ; ASP definitions
  389. ;
  390. ;
  391. ; Offsets in user bytes
  392. ;
  393. aspCmdCode        EQU         0                         ; Offset to command field
  394. aspWSSNum         EQU         1                         ; WSS number in OpenSessions
  395. aspVersNum        EQU         2                         ; ASP version number in OpenSessions
  396. ;
  397. aspSSSNum         EQU         0                         ; SSS number in OpenSessReplies
  398. aspSessID         EQU         1                         ; Session ID (requests & OpenSessReply)
  399. aspOpenErr        EQU         2                         ; OpenSessReply error code
  400. ;
  401. aspSeqNum         EQU         2                         ; Sequence number in requests
  402. aspAttnCode       EQU         2                         ; Attention bytes in attentions
  403. ;
  404. ; Offsets in ATP data part
  405. ;
  406. aspWrBSize        EQU         0                         ; Offset to write buffer size (WriteData)
  407. aspWrHdrSz        EQU         2                         ; Size of data part
  408. ;
  409. ; ASP command codes - the following define the different types of ASP requests:
  410. ;
  411. aspCloseSess      EQU         1                         ; Close session
  412. aspCommand        EQU         2                         ; User-command
  413. aspGetStat        EQU         3                         ; Get status
  414. aspOpenSess       EQU         4                         ; Open session
  415. aspTickle         EQU         5                         ; Tickle
  416. aspWrite          EQU         6                         ; Write
  417. aspDataWrite      EQU         7                         ; WriteData (from server)
  418. aspAttention      EQU         8                         ; Attention (from server)
  419. ;
  420. ; ASP miscellaneous
  421. ;
  422. aspVersion        EQU         $0100                     ; ASP version number
  423. maxCmdSize        EQU         atpMaxData                ; Maximum command block size
  424. quantumSize       EQU         atpMaxData*atpMaxNum      ; Maximum reply size
  425. tickleInt         EQU         30                        ; Tickle interval (secs)
  426. tickleTime        EQU         tickleInt*60*4            ; Tickle timeout (ticks)
  427. ;
  428. ;+ Control codes. NOTE: high byte of CSCode used internally
  429. ;
  430. openSess          EQU         255                       ; Open session
  431. closeSess         EQU         254                       ; Close session
  432. userCommand       EQU         253                       ; User command
  433. userWrite         EQU         252                       ; User write
  434. getStatus         EQU         251                       ; Get status
  435. afpCall           EQU         250                       ; AFP command (buffer has command code)
  436. getParms          EQU         249                       ; Get parameters
  437. abortOS           EQU         248                       ; Abort open session request
  438. closeAll          EQU         247                       ; Close all open sessions
  439. xCall            EQU            246                        ; .XPP extended calls
  440. ;
  441. ;
  442. ; ASP queue element standard structure: arguments passed in the CSParam area
  443. ;
  444. sessRefnum        EQU         $1C                       ; Offset to session refnum [word]
  445. aspTimeout        EQU         $1E                       ; Timeout for ATP [byte]
  446. aspRetry          EQU         $1F                       ; Retry count for ATP [byte]
  447. serverAddr        EQU         $20                       ; Server address block [longword]
  448. scbPointer        EQU         $24                       ; SCB pointer [longword]
  449. attnRoutine       EQU         $28                       ; Attention routine pointer [long]
  450. ;
  451. cbSize            EQU         $20                       ; Command block size [word]
  452. cbPtr             EQU         $22                       ; Command block pointer [long]
  453. rbSize            EQU         $26                       ; Reply buffer size [word]
  454. rbPtr             EQU         $28                       ; Reply buffer pointer [long]
  455. wdSize            EQU         $2C                       ; Write data size [word]
  456. wdPtr             EQU         $2E                       ; Write data pointer [long]
  457. ccbStart          EQU         $32                       ; Start of memory for CCB
  458. ;
  459. aspMaxCmdSize     EQU         $1C                       ; For SPGetParms [word]
  460. aspQuantumSize    EQU         $1E                       ; For SPGetParms [word]
  461. numSesss          EQU         $20                       ; For SPGetParms [word]
  462. ;
  463. abortSCBPtr       EQU         $1C                       ; SCB pointer for AbortOS [long]
  464. ;
  465. cmdResult         EQU         $12                       ; Command result (ATP user bytes) [long]
  466. ;
  467. afpAddrBlock      EQU         $2C                       ; Address block in AFP login [long]
  468. afpSCBPtr         EQU         $30                       ; SCB pointer in AFP login [long]
  469. afpAttnRoutine    EQU         $34                       ; Attn routine pointer in AFP login
  470. ;
  471. scbMemSize        EQU         $C0                       ; Size of memory for SCB
  472.                   EJECT
  473. ;______________________________________________________________
  474. ;
  475. ; .XPP xCall information
  476. ;______________________________________________________________
  477. ;
  478. ; xCall subCode definitions (subCodes 0 thru 4 are reserved for internal use)
  479. ;
  480. xAddCall            EQU         0
  481. xDelCall            EQU         1
  482.  
  483.  
  484. zipGetLocalZones    EQU            5                    ; xCall subcodes
  485. zipGetZoneList         EQU          6
  486. zipGetMyZone         EQU            7
  487.  
  488. xMinCall            EQU         zipGetLocalZones    ; first xCall that can be added
  489. xMaxCall            EQU         31                  ; highest legal xCall
  490. ;
  491. ; xCall queue element offsets
  492. ;
  493. xppSubCode          EQU         $1C                    ; (csCode+2) offset to extended call subcode
  494. AddCSCode           EQU         xppSubCode+2        ; csCode of added call
  495. AddCSAddr           EQU         AddCSCode+2         ; addr of added call's routine
  496.  
  497. ;
  498. ; SetMyZone queue element offsets (MPP)
  499. ;
  500. zoneBuffPtr         EQU         30
  501. zoneBuffSize         EQU            34
  502. numOfZones          EQU         36
  503.  
  504.  
  505. xppTimeout          EQU         30
  506. xppRetry            EQU         31
  507. zipBuffPtr          EQU         34
  508. zipNumZones         EQU         38
  509. zipLastFlag         EQU         40
  510. zipInfoField         EQU            42
  511.  
  512. ;______________________________________________________________
  513. ;
  514. ; AFP Command command codes
  515. ;______________________________________________________________
  516. ;
  517. afpByteRangeLock  EQU         1
  518. afpVolClose       EQU         2
  519. afpDirClose       EQU         3
  520. afpForkClose      EQU         4
  521. afpCopyFile       EQU         5
  522. afpDirCreate      EQU         6
  523. afpFileCreate     EQU         7
  524. afpDelete         EQU         8
  525. afpEnumerate      EQU         9
  526. afpFlush          EQU         10
  527. afpForkFlush      EQU         11
  528. afpGetDirParms    EQU         12
  529. afpGetFileParms   EQU         13
  530. afpGetForkParms   EQU         14
  531. afpGetSInfo       EQU         15
  532. afpGetSParms      EQU         16
  533. afpGetVolParms    EQU         17
  534. afpLogin          EQU         18
  535. afpContLogin      EQU         19
  536. afpLogout         EQU         20
  537. afpMapID          EQU         21
  538. afpMapName        EQU         22
  539. afpMove           EQU         23
  540. afpOpenVol        EQU         24
  541. afpOpenDir        EQU         25
  542. afpOpenFork       EQU         26
  543. afpRead           EQU         27
  544. afpRename         EQU         28
  545. afpSetDirParms    EQU         29
  546. afpSetFileParms   EQU         30
  547. afpSetForkParms   EQU         31
  548. afpSetVolParms    EQU         32
  549. afpWrite          EQU         33
  550. afpGetFlDrParms   EQU         34
  551. afpSetFlDrParms   EQU         35
  552. ;
  553. afpDTOpen         EQU         48
  554. afpDTClose        EQU         49
  555. afpGetIcon        EQU         51
  556. afpGtIcnInfo      EQU         52
  557. afpAddAPPL        EQU         53
  558. afpRmvAPPL        EQU         54
  559. afpGetAPPL        EQU         55
  560. afpAddCmt         EQU         56
  561. afpRmvCmt         EQU         57
  562. afpGetCmt         EQU         58
  563. ;
  564. afpAddIcon        EQU         192                       ; Special code for ASP Write commands
  565. ;
  566. ;____________________________________
  567. ;
  568. ; Offsets for certain parameters in AFP Read/Write calls
  569. ;____________________________________
  570. ;
  571. startEndFlag      EQU         $1                        ; Write only; offset relative to start or end
  572. rwOffset          EQU         $4                        ; Offset at which to start read or write
  573. reqCount          EQU         $8                        ; Count of bytes to read or write
  574. newLineFlag       EQU         $C                        ; Read only; newline character flag
  575. newLineChar       EQU         $D                        ; Read only; newline character
  576. ;
  577. lastWritten       EQU         $0                        ; Write only; last written (returned)
  578. ;
  579. ;____________________________________
  580. ;
  581. ; Miscellaneous
  582. ;____________________________________
  583. ;
  584. afpUseWrite       EQU         $C0                       ; first call in range that maps to an ASPWrite
  585.  
  586.  
  587. MaxNodeIds      EQU         254                     ; maximum node ids (1-254)
  588. MaxNetIds       EQU         $FFFE                   ; maximum net ids (1-65534)
  589. reservedNode     EQU            $FE                     ; special SysABridge token says we've heard from router
  590. reservedNet     EQU         $FF00                   ; first network number in reserved range
  591.  
  592.  
  593. ; GetAppleTalkInfo
  594.  
  595. GAIVersion        EQU        1                                ; highest version for GAI params
  596.  
  597. GAI         RECORD      $1C                                 ; (csParam) GetAppleTalkInfo params
  598. Version     DS.W        1                                ; --> params version desired
  599. VarsPtr     DS.L        1                                ; <-- MPP vars for this PortID
  600. DCEPtr        DS.L        1                                ; <-- DCE ptr for the PortID
  601. PortID        DS.W        1                                ; <-- port number [0..7]
  602. Configuration DS.L        1                                ; <-- 32-bit config word
  603. SelfSend    DS.W        1                                ; <-- ≠ zero if SelfSend is enabled
  604. NetLo        DS.W        1                                ; <-- low-value of network range
  605. NetHI        DS.W        1                                ; <-- high-value of network range
  606. OurAddr     DS.L        1                                ; <-- our 24-bit AppleTalk address
  607. RouterAddr    DS.L        1                                ; <-- 24-bit address of last router
  608. NumOfPHs    DS.W        1                                ; <-- max. number of protocol handlers
  609. NumOfSkts    DS.W        1                                ; <-- max. number of static sockets
  610. NumNBPEs    DS.W        1                                ; <-- max. number of concurrent NBP requests
  611. NTQueue     DS.L        1                                ; <-- ptr to registered names queue
  612. LALength    DS.W        1                                ; <-> length of data link address in bytes
  613. LinkAddr    DS.L        1                                ; <-> ptr to buffer to store data link address
  614. ZoneName    DS.L        1                                ; <-> ptr to buffer to store zone name
  615. GAISz        DS.B        0
  616.             ENDR
  617.  
  618. RTMPHdr     RECORD        0
  619. SenderNet    DS.W        1                                ; sender's network number
  620. IDlength    DS.B        1                                ; id length (always 8)
  621. SenderID    DS.B        1                                ; sender's node id
  622. NullNet     DS.W        1                                ; null word for non-extended net
  623. Version1    DS.B        1                                ; version for non-extended net
  624. NonExtSize    DS.B        0                                ; minimum size for non-extended
  625.  
  626.             ORG         NullNet
  627. StartNetHi    DS.B        1                                ; extended high range, high byte
  628. StartNetLo    DS.B        1                                ; extended high range, low byte
  629. Distance    DS.B        1                                ; extended range distance
  630. EndNetHi    DS.B        1                                ; extended low range, high byte
  631. EndNetLo    DS.B        1                                ; extended low range, low byte
  632. Version2    DS.B        1                                ; extended version
  633. ExtSize     DS.B        0                                ; mininum size for extended net
  634.             ENDR
  635.  
  636.  
  637.     ENDIF    ; ...already included